<template>
	<view>
		<cu-custom bgColor="bg-red" :isBack="true">		<block slot="backText"></block>
			<block slot="content">报单详情</block>
		</cu-custom>
		<view class="">
			<view class="cu-form-group margin-top">
				<view class="title">级别</view>
				<view class="action">{{detail?detail.level.name:''}}</view>
			</view>
			<view class="cu-form-group">
				<view class="title">省市</view>
				<view class="action" v-if="detail">{{detail.province?detail.province.title:''}}{{detail.city?detail.city.title:''}}</view>
			</view>
			<view class="cu-form-group">
				<view class="title">姓名</view>
				<view class="action">{{detail?detail.realname:''}}</view>
			</view>
			<view class="cu-form-group">
				<view class="title">手机号</view>
				<view class="action">{{detail?detail.mobile:''}}</view>
			</view>

			<view class="cu-form-group margin-top">
				<view class="title">推荐人</view>
				<view class="action">{{detail?detail.channel_pid:''}}</view>
			</view>
			<!-- <view class="cu-form-group ">
				<view class="title">配送产品</view>
				<picker @change="LevelPickerChange" :value="levelIndex" :range="picker">
					<view class="picker">
						{{levelIndex>-1?picker[levelIndex]:'请选择'}}
					</view>
				</picker>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				CLOUDPATH: this.$config.cloudPath,
				theme: this.$config.THEME(),
				id:0,
				detail: null,
			}
		},
		onLoad(options) {
			if(!options.id){
				this.$common.showErrorModal('参数有误')
				return
			}
			this.id = options.id
			if (this.$common.loginAuth(true)) {
				this.getDetail()
			}
		},
		methods: {
			getDetail() {
				uni.showLoading({
					title:'加载中...'
				})
				this.$http
					.get('channel_apply_detail', {
						id: this.id
					})
					.then((response) => {
						console.log(response)
						this.detail = response.data.data
						uni.hideLoading()
					})
					.catch((response) => {
						console.log(response)
						uni.hideLoading()
					})

			}
		},
	}
</script>

<style>
</style>
